<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>测试 查询 test页面</title>
</head>
<body>
				<h1>分页查询 test页面</h1>
				<form action="/user_page_list" method="get">
					请输入用户姓名：<input type="text" name="username">
					请输入id：<input type="text" name="userid">
					<input type="submit" value="查询">
				</form>
				<main th:if="${userpage!=null}" >
					<h2>Section title</h2>
					<div>
						<table>
							<thead>
								<tr>
									<th>编号</th>
									<th>员工姓名</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="u:${userpage.getResult()}">
									<td th:text="${u.user_id}"></td>
									<td th:text="${u.user_name}"></td>
								</tr>
							</tbody>
						</table>
						<span th:if="${userpage.getPageNum()>1}">
							<a th:href="@{/user_page_list(
							pageNum=${userpage.getPageNum()-1},
							username=${username},
							userid=${userid}
							)}">上一页</a>
							<a th:href="@{/user_page_list(
							pageNum=1,
							username=${username},
							userid=${userid}
							)}">首页</a>
						</span>
						<span th:if="${userpage.getPageNum()<userpage.getPages()}">
							<a th:href="@{/user_page_list(
							pageNum=${userpage.getPageNum()+1},
							username=${username},
							userid=${userid}
							)}">下一页</a>
							<a th:href="@{/user_page_list(
							pageNum=${userpage.getPages()},
							username=${username},
							userid=${userid}
							)}">尾页</a>
						</span>
					</div>
				</main>
				
</body>
</html>